
package com.trade.service.impl;

import java.util.List;

import com.trade.dao.ICustomerDao;
import com.trade.model.Customer;
import com.trade.service.ICustomerService;;

/**
 * 
 * @author dean peng
 * 
 */
public class CustomerServiceImpl implements ICustomerService {
    private ICustomerDao customerDao;

    public void setCustomerDao(ICustomerDao customerDao) {
        this.customerDao = customerDao;
    }

    public ICustomerDao getCustomerDao()
    {
        return this.customerDao;
    }
    
    @Override
    public Customer getByCustomerName(String strCustomerName)
    {
        return customerDao.getByCustomerName(strCustomerName);
    }
    
    @Override
    public Customer GetCustomerById(String strCustomerID)
    {
        return customerDao.GetCustomerById(strCustomerID);
    }

    
    @Override
    public Boolean AddCustomer(Customer customer) {
        return customerDao.AddCustomer(customer);
    }

    @Override
    public List<Customer> getAllCustomerUsers()
    {
    	return customerDao.getAllCustomers();
    }
    
    @Override
    public Boolean DeleteCustomer(String strCustomerID)
    {
    	return customerDao.DeleteCustomer(strCustomerID);
    }
    
    @Override
    public Boolean UpdateCustomer(Customer customer)
    {
    	return customerDao.UpdateCustomer(customer);
    }
    
}

